
using System.Data.Entity.ModelConfiguration;

namespace OBUCare.Core.Models.Mapping
{
    public class FUND_DETAILMap : EntityTypeConfiguration<FUND_DETAIL>
    {
        public FUND_DETAILMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            // Table & Column Mappings
            this.ToTable("FUND_DETAIL");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.FUND_ID).HasColumnName("FUND_ID");
            this.Property(t => t.SERIAL_ID).HasColumnName("SERIAL_ID");

            this.HasRequired(t => t.FUND_INFO)
            .WithMany(t => t.FUND_DETAIL)
            .HasForeignKey(d => d.FUND_ID);
        }
    }
}
